package com.ukao.cashregister.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by kefu001 on 2018/6/15.
 */

public class ClientGroupingBean extends BaseListBean<ClientGroupingBean> implements Parcelable{
        /**
         * id : 30
         * mercId : 1
         * cityId : 1
         * name : 测试
         * cnt : 1
         * createBy : 2
         * createTime : 1524040122000
         * updateBy : 2
         * updateTime : 1529047386000
         */

        private int id;
        private int mercId;
        private int cityId;
        private String name;
        private int cnt;
        private int createBy;
        private long createTime;
        private int updateBy;
        private long updateTime;
        private boolean isSelected;

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getMercId() {
            return mercId;
        }

        public void setMercId(int mercId) {
            this.mercId = mercId;
        }

        public int getCityId() {
            return cityId;
        }

        public void setCityId(int cityId) {
            this.cityId = cityId;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getCnt() {
            return cnt;
        }

        public void setCnt(int cnt) {
            this.cnt = cnt;
        }

        public int getCreateBy() {
            return createBy;
        }

        public void setCreateBy(int createBy) {
            this.createBy = createBy;
        }

        public long getCreateTime() {
            return createTime;
        }

        public void setCreateTime(long createTime) {
            this.createTime = createTime;
        }

        public int getUpdateBy() {
            return updateBy;
        }

        public void setUpdateBy(int updateBy) {
            this.updateBy = updateBy;
        }

        public long getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(long updateTime) {
            this.updateTime = updateTime;
        }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.mercId);
        dest.writeInt(this.cityId);
        dest.writeString(this.name);
        dest.writeInt(this.cnt);
        dest.writeInt(this.createBy);
        dest.writeLong(this.createTime);
        dest.writeInt(this.updateBy);
        dest.writeLong(this.updateTime);
        dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
    }

    public ClientGroupingBean() {
    }

    protected ClientGroupingBean(Parcel in) {
        this.id = in.readInt();
        this.mercId = in.readInt();
        this.cityId = in.readInt();
        this.name = in.readString();
        this.cnt = in.readInt();
        this.createBy = in.readInt();
        this.createTime = in.readLong();
        this.updateBy = in.readInt();
        this.updateTime = in.readLong();
        this.isSelected = in.readByte() != 0;
    }

    public static final Creator<ClientGroupingBean> CREATOR = new Creator<ClientGroupingBean>() {
        @Override
        public ClientGroupingBean createFromParcel(Parcel source) {
            return new ClientGroupingBean(source);
        }

        @Override
        public ClientGroupingBean[] newArray(int size) {
            return new ClientGroupingBean[size];
        }
    };
}
